package com.zmn.plat.model.entity.product;

import com.zmn.common.utils.pager.Pages;

import java.io.Serializable;

/**
 * @author tanghongjun
 * @version v1.0
 * @since 2018/10/16 11:30
 * @类说明：
 */
public class ServProductAttributeValueQuery extends Pages {
    /**
     * 商品属性值表（多个属性对应一个服务项-价格）

     */
    private Integer valueRelateId;

    /**
     * 属性组

     */
    private Integer relateId;

    /**
     * 分类属性值表
     */
    private Integer enumId;

    /**
     * 属性值

     */
    private String enumValue;

    private static final long serialVersionUID = 1L;

    public Integer getValueRelateId() {
        return valueRelateId;
    }

    public void setValueRelateId(Integer valueRelateId) {
        this.valueRelateId = valueRelateId;
    }

    public Integer getRelateId() {
        return relateId;
    }

    public void setRelateId(Integer relateId) {
        this.relateId = relateId;
    }

    public Integer getEnumId() {
        return enumId;
    }

    public void setEnumId(Integer enumId) {
        this.enumId = enumId;
    }

    public String getEnumValue() {
        return enumValue;
    }

    public void setEnumValue(String enumValue) {
        this.enumValue = enumValue;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ServProductAttributeValue other = (ServProductAttributeValue) that;
        return (this.getValueRelateId() == null ? other.getValueRelateId() == null : this.getValueRelateId().equals(other.getValueRelateId()))
            && (this.getRelateId() == null ? other.getRelateId() == null : this.getRelateId().equals(other.getRelateId()))
            && (this.getEnumId() == null ? other.getEnumId() == null : this.getEnumId().equals(other.getEnumId()))
            && (this.getEnumValue() == null ? other.getEnumValue() == null : this.getEnumValue().equals(other.getEnumValue()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getValueRelateId() == null) ? 0 : getValueRelateId().hashCode());
        result = prime * result + ((getRelateId() == null) ? 0 : getRelateId().hashCode());
        result = prime * result + ((getEnumId() == null) ? 0 : getEnumId().hashCode());
        result = prime * result + ((getEnumValue() == null) ? 0 : getEnumValue().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", valueRelateId=").append(valueRelateId);
        sb.append(", relateId=").append(relateId);
        sb.append(", enumId=").append(enumId);
        sb.append(", enumValue=").append(enumValue);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}